#ifndef EVENTDISPATCHER_H
#define EVENTDISPATCHER_H

#include "room_global.h"
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>

class Event;
class Server;

class EventDispatcher :
        protected boost::noncopyable
{
public:
    typedef boost::shared_ptr< Event > EventPtr;

public:
    EventDispatcher(Server &server);
    ~EventDispatcher();

    size_t loop();

protected:
    bool dispatch(const EventPtr &ev);

private:
    Server &m_server;
};

#endif // EVENTDISPATCHER_H
